package com.atmk.atmk.designMode.创建型.工厂模式.抽象工厂;

import com.atmk.atmk.designMode.创建型.工厂模式.抽象工厂.具体工厂.CarFactory;
import com.atmk.atmk.designMode.创建型.工厂模式.抽象工厂.具体工厂.TruckFactory;
import com.atmk.atmk.designMode.创建型.工厂模式.抽象工厂.抽象产品.Car;
import com.atmk.atmk.designMode.创建型.工厂模式.抽象工厂.抽象产品.Truck;
import com.atmk.atmk.designMode.创建型.工厂模式.抽象工厂.抽象工厂.VehicleFactory;

public class Main {
    // 客户端代码
    public static void main(String[] args) {
        VehicleFactory carFactory = new CarFactory();
        VehicleFactory truckFactory = new TruckFactory();
        Car car = carFactory.produceCar();
        car.showInfo();  // 输出：This is a CarA.

        Truck truck = truckFactory.produceTruck();
        truck.showInfo();  // 输出：This is a TruckA.
    }

}
